<!-- templates/login.html -->
<!DOCTYPE html>
<html>
<head>
    <title>登录</title>
    {% load static %}
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            font-family: Arial, sans-serif;
            background-image: url('{% static "image/3.jpg" %}'); /* 设置背景图片 */
            background-size: cover; /* 图片大小覆盖整个容器 */
            background-position: center; /* 图片位置居中 */
            background-repeat: no-repeat; /* 图片不重复 */
        }
        .login-container {
            text-align: center;
            width: 300px;
            background-color: rgba(255,255,255,0); /* 设置登录框背景颜色 */
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h2 {
            margin-bottom: 20px;
        }
        form {
            width: 100%;
            text-align: center;
        }
        button {
            padding: 10px 20px;
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
    <div class="login-container">
        <h2>登录</h2>
        <form method="post">
            {% csrf_token %}
            {{ form.as_p }}
            <button type="submit">登录</button>
            <div class="forgot-password">
                <a href="{% url 'password_reset_request' %}">忘记密码？</a>
            </div>
        </form>
    </div>
</body>
</html>
